<?php
defined('BASEPATH') OR exit('No direct script access allowed');
	class Product_catalog_model extends CI_Model{
        public $table_name='product_catalog';
    	public function get_all(){
            $query=$this->db->where('parent_id',0)->get($this->table_name);
            return $query->result();
        }
       public function get_one($id){
            $query=$this->db->where('id',$id)->get($this->table_name);
            return $query->row();
        }
        public function get_parent_lists($parent_id){
            $query=$this->db->where('parent_id',$parent_id)->get($this->table_name);
            return $query->result();
        }
	}